webEditor.define(function(exports){
	var MOD_NAME = 'menu';
	var leftMenu = function(){
		var ele = "#app .LdgFormControls";
		this.render = function(data){
			var str = '';
			if(data){
				for(var key in data){

					try{
						// var path = typeof data[key].path != "undefined" ? data[key].path : data[key].type;
						// webEditor.loadJSModule(rootPath + "component/widgets/"+path+'.js');
					}catch(e){
						console.log(e);
					}
					if(typeof(data[key].hidden)!="undefined" && data[key].hidden){
						continue;
					}			
					str += '<div class="controlName" data-type="' + data[key].type + '">'
					str += '<div class="controlRealName"><i  class="iconfont ' + data[key].icon + '"></i>' + data[key].name + '</div>'
					str += '</div>'
				}
			}
			$(ele).html(str);
		}
		
	}

	exports(MOD_NAME, new leftMenu());
});